-- GENERATED SPELL FOR [Mo'arg Extractor] --


function spell0_22304(pUnit, Event) --@Drill,Self--
pUnit:FullCastSpellOnTarget(40839,pUnit)
pUnit:RegisterEvent('Sorts_22304', 7500, 1)
end

function spell1_22304(pUnit, Event) --@Frighten,n/a--
pUnit:FullCastSpellOnTarget(40454,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22304', 20308, 1)
end

function spell2_22304(pUnit, Event) --@Toxic Slime,Self--
pUnit:FullCastSpellOnTarget(40818,pUnit)
pUnit:RegisterEvent('Sorts_22304', 11500, 1)
end

function Sorts_22304(pUnit, Event)
local choix_sorts_22304 = math.random(0, 2)
if choix_sorts_22304 == 0 then
pUnit:RegisterEvent('spell0_22304', 1, 1)
end
if choix_sorts_22304 == 1 then
pUnit:RegisterEvent('spell1_22304', 1, 1)
end
if choix_sorts_22304 == 2 then
pUnit:RegisterEvent('spell2_22304', 1, 1)
end
end

function mob22304_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22304', math.random(1500, 3000), 1)
end

function mob22304_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22304_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22304_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22304, 1, 'mob22304_Action')
RegisterUnitEvent(22304, 2, 'mob22304_Leave')
RegisterUnitEvent(22304, 3, 'mob22304_Kill')
RegisterUnitEvent(22304, 4, 'mob22304_Die')
